home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 4
/
Amiga Tools 4.iso
/
tools
/
wb-enhancement
/
swazblanker
/
programmer
/
include
/
libraries
/
swazblanker.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-26
|
9KB
|
275 lines
#ifndef LIBRARIES_SWAZBLANKER_H
#define LIBRARIES_SWAZBLANKER_H
/*
** $Filename: libraries/swazblanker.h $
** $Release: 2.12 $
** $Revision: 42.0 $
**
** SwazBlanker definitions
**
** (C) Copyright 1993-94 David Swasbrook
** All Rights Reserved
*/
/*****************************************************************************/
#ifndef EXEC_LIBRARIES_H
#include <exec/libraries.h>
#endif
/*****************************************************************************/
#define SWAZBLANKERNAME "swazblanker.library"
#define SB_TagBase TAG_USER+0x80000
/*****************************************************************************/
/*****************************************************************************
This structure is private, you should not have any need to read or write
to this. If you need read/write please use the SB_Get and SB_Set functions.
*/
struct SwazBlankerBase {
struct Library LibNode;
UBYTE Flags;
APTR SegList;
struct SignalSemaphore Semaphore; /* Shared resources management */
APTR OldMousePtr; /* A blank pointer, useful when opening a blank screen */
struct Task *ServerMaster; /* Pointer to swazblanker master task */
struct Task *BlankerTask; /* Pointer to blanker task */
struct Screen *Screen; /* Pointer to blanker screen */
struct Window *Window; /* Pointer to blanker window */
BYTE BlankerDieSignal; /* Signal to server task from blanker */
BYTE BlankerReadySignal; /* Signal to server task from blanker */
WORD Pad2;
STRPTR OldInterfaceFontName; /* Name of font to use for interfaces (NULL) */
STRPTR BlankerDir; /* Full Path to blanker directory */
struct MsgPort *SBPort; /* Port for use by SwazBlanker only */
STRPTR SaveFileName; /* Filename for saving configuration */
STRPTR UseFileName; /* Filename for loading/using configuration */
/* PRIVATE FIELDS FOLLOW */
struct SignalSemaphore ConfigSemaphore; /* Config Shared resources management */
BYTE BlankerTaskPri;
STRPTR GuiFont;
struct Window *PrefsWindow;
struct List BlankNotifyList; /* List of SBNotify structures */
struct List PrefsList; /* List of preferences modules running */
};
/*****************************************************************************
This structure is for messages to the SBPort
*/
struct SBMessage {
struct Message Message;
ULONG Type; /* See below for message types */
ULONG Data; /* Specific for type */
ULONG Result; /* Result */
};
#define SBMSG_PING 0
#define SBMSG_BECOMEBLANKER 1
#define SBMSG_BECOMEBLANKER_END 2
/*****************************************************************************
This structure is returned by SB_BlankerInfo()
*/
struct BlankerInfo {
struct Node Node; /* So you can link it into a list if you like */
UWORD Version; /* Version of blanker module */
UWORD Revision; /* Revision of blanker module */
STRPTR ShortDesc; /* breif description */
STRPTR LongDesc; /* information buffer */
STRPTR Author; /* authors name */
STRPTR EMail; /* email address */
STRPTR Time; /* Compilation date/time */
ULONG Stack; /* recommended stack size */
ULONG Kickstart; /* minimum kickstart required */
ULONG CPU; /* cpu */
ULONG Loading;
/*** Private fields follow ***/
void *Pool; /* Pool stuff */
};
/*****************************************************************************
This structure is returned by SB_OpenColorCycleTagList()
Structure is PRIVATE!
*/
struct SBColorCyc {
ULONG Flags;
BYTE DieSig;
struct Screen *Screen;
struct ViewPort *ViewPort;
struct Task *ColorTask;
struct Task *CreatorTask;
APTR Private;
};
/*****************************************************************************
This structure is returned by SB_OpenCopperTagList()
Structure is PRIVATE!
*/
#define SB_MINCOPPER 30
#define SB_MAXCOPPER 200
struct SBCopper {
BYTE DieSig;
UBYTE Pen;
UBYTE ColorAdd;
UBYTE ColorRemove;
UBYTE Color[3];
UBYTE Pad;
WORD Spacing;
WORD SpectrumLength;
WORD YOffset;
struct Screen *Screen;
struct Task *CopperTask;
struct Task *CreatorTask;
struct ViewPort *ViewPort;
struct UCopList *UCopList;
WORD Speed;
WORD CurrLev;
WORD YStart;
WORD YStop;
/* Raw data follows ... */
LONG Spectrum[SB_MAXCOPPER*2];
};
/*****************************************************************************
This structure is returned by SB_AddPrefsTaskTagList()
*/
struct BlankerPrefsNode {
struct Node Node; /* Standard exec node */
struct Task *task; /* Pointer to prefs task */
struct Window *window; /* Pointer to window owned by prefs task */
APTR SBHelp; /* Pointer returned by SB_HelpTagList() */
};
/*****************************************************************************
Mode values for SB_LockSBBase() and SB_UnLockSBBase().
*/
#define SBLOCK_READ 0
#define SBLOCK_WRITE 1
/*****************************************************************************
Tag values for SB_SetBaseVarTagList() and SB_GetBaseVarTagList().
*/
#define SBBV_ObtainSemaphore SB_TagBase+0x01
#define SBBV_FontInfo SB_TagBase+0x02
#define SBBV_PrefsWindow SB_TagBase+0x03
#define SBBV_BlankerPath SB_TagBase+0x04
#define SBBV_BlankerTaskPri SB_TagBase+0x06
#define SBBV_NumberOfPrefsTasks SB_TagBase+0x07
#define SBBV_TimeString SB_TagBase+0x08
/*****************************************************************************
Tag values for SB_BlankerInfoTagList();
*/
#define SBBI_Buffer SB_TagBase+0x100
/*****************************************************************************
Tag values for SB_HelpTagList();
*/
#define SBHELP_BlankerPrefs SB_TagBase+0x101
#define SBHELP_Directory SB_TagBase+0x102
#define SBHELPDIR_SYS 0 /* Dir for main help files etc... */
#define SBHELPDIR_BLANKERS 1 /* Directory for blanker help files */
/*****************************************************************************
Tag values for SB_OpenCopperTagList() and SB_SerCopperTagList().
*/
#define SBCOPPER_RandomiseColors SB_TagBase+0x201 /* Randomise the colors being used */
#define SBCOPPER_YStart SB_TagBase+0x202 /* First line of copper */
#define SBCOPPER_YStop SB_TagBase+0x203 /* Last line of copper */
#define SBCOPPER_Disabled SB_TagBase+0x204 /* Set to TRUE to turn effect off */
#define SBCOPPER_ScanLinesPerColor SB_TagBase+0x205 /* How many scanlines before color change */
#define SBCOPPER_Speed SB_TagBase+0x206 /* How far copper should move in scanlines/vnblank */
#define SBCOPPER_Pen SB_TagBase+0x207 /* Pen to use for copper effect */
/*****************************************************************************
Structure returned by SB_Init()
*/
struct SBInit {
STRPTR Name; /* Name of the module */
struct Catalog *Catalog; /* Opened locale catalog */
ULONG Method; /* Invokation method (see below) */
/* Private fields follow */
BPTR OldProgDir;
BPTR OldCurrentDir;
UBYTE NameBuffer[32];
};
#define SBINIT_METHOD_NONE 0
#define SBINIT_METHOD_PREFS 1
#define SBINIT_METHOD_BLANK 2
#define SBINIT_METHOD_INFO 3
/*****************************************************************************
Tag values for SB_InitTagList().
*/
#define SBINIT_Name SB_TagBase+0x300 /* Name of module */
#define SBINFO_ShortDesc SB_TagBase+0x301 /* string for short info */
#define SBINFO_LongDesc SB_TagBase+0x302 /* string for long info */
#define SBINFO_CPU SB_TagBase+0x305 /* CPU Type required */
#define SBINFO_CPULoading SB_TagBase+0x306 /* CPU Loading level (see below) */
#define SBINFO_Stack SB_TagBase+0x307 /* Stack required */
#define SBINFO_EMail SB_TagBase+0x308 /* EMail address of author */
#define SBINFO_Author SB_TagBase+0x309 /* Name of author */
#define SBINFO_Kickstart SB_TagBase+0x30A /* Minimum kickstart version */
#define SBINFO_Version SB_TagBase+0x30B /* Version */
#define SBINFO_Revision SB_TagBase+0x30C /* Revision */
#define SBINFO_Time SB_TagBase+0x30D /* Compilation time */
#define SBINFOLOAD_NONE 0
#define SBINFOLOAD_LOW 1
#define SBINFOLOAD_LOWMED 2
#define SBINFOLOAD_MEDIUM 3
#define SBINFOLOAD_MEDHIGH 4
#define SBINFOLOAD_HIGH 5
#define SBDEF_KICKSTART 39
#define SBDEF_STACK 4096
#define SBDEF_CPU 68000
#define SBDEF_CPULOAD SBINFOLOAD_LOW
/*****************************************************************************
Tag values for SB_BlankNotifyTagList().
*/
#define SBNOTIFY_Task SB_TagBase+0x400 /* Task to signal */
#define SBNOTIFY_BlankSigMask SB_TagBase+0x401 /* Mask of signals to set */
#define SBNOTIFY_UnBlankSigMask SB_TagBase+0x402 /* Mask of signals to set */
#endif /* LIBRARIES_SWAZBLANKER_H */